<?php
/*
 * File FactuurRegel.php for project Rijlesplanner.nl
 * Created on Feb 3, 2008 at 9:37:54 PM by Ivar Pruijn
 */
 
class FactuurRegel {
  
	// Properties:
	private $Id;
	private $Datum;
	private $ItemType;
	private $Product;
	private $Kostenplaats;
	private $Aantal;
	private $Omschrijving;
	private $Bedrag;
	private $Totaal;
	private $BtwTarief;
	private $Flexibel;
	private $MinutenPerBedrag;

	// Methods:

	/**
	 * void __construct ()
	 * This is the constructor method for the FactuurRegel class.
	 */
	public function __construct() {
   	}
   	
   	public function FactuurRegel(array $atts=NULL) {
		$this->ConstructFromArray($atts);
	}
	
	public function getId() {
	  return $this->Id;
	}

	public function setId($newVal) {
		$this->Id = $newVal;
	}

	public function getDatum() {
	  return $this->Datum;
	}

	public function setDatum($newVal) {
		$this->Datum = $newVal;
	}

	public function getItemType() {
	  return $this->ItemType;
	}

	public function setItemType($newVal) {
		$this->ItemType = $newVal;
	}

	public function getProduct() {
	  return $this->Product;
	}

	public function setProduct($newVal) {
		$this->Product = $newVal;
	}

	public function getKostenplaats() {
	  return $this->Kostenplaats;
	}

	public function setKostenplaats($newVal) {
		$this->Kostenplaats = $newVal;
	}

	public function getAantal() {
	  return $this->Aantal;
	}

	public function setAantal($newVal) {
		$this->Aantal = $newVal;
	}

	public function getOmschrijving() {
	  return $this->Omschrijving;
	}

	public function setOmschrijving($newVal) {
		$this->Omschrijving = $newVal;
	}

	public function getBedrag() {
	  return $this->Bedrag;
	}

	public function setBedrag($newVal) {
		$this->Bedrag = $newVal;
	}

	public function getTotaal() {
	  return $this->Totaal;
	}

	public function setTotaal($newVal) {
		$this->Totaal = $newVal;
	}

	public function getBtwTarief() {
	  return $this->BtwTarief;
	}

	public function setBtwTarief($newVal) {
		$this->BtwTarief = $newVal;
	}

	public function getFlexibel() {
		return $this->Flexibel;
	}
	
	public function setFlexibel($newVal) {
		$this->Flexibel = $newVal;
	}
	
	public function getMinutenPerBedrag() {
		return $this->MinutenPerBedrag;
	}
	
	public function setMinutenPerBedrag($newVal) {
		$this->MinutenPerBedrag = $newVal;
	}
	
	/**
	 * void ConstructFromArray ([array attributes])
	 * This method, if an array is given as the argument, will
	 * create properties in the current object named after the
	 * keys of the array, and set the properties to the corresponding
	 * values from the array.
	 */
	private function ConstructFromArray (array $atts=NULL) {
		if (is_array($atts)) {
			while (list($key, $value) = each($atts)) {
				$this->$key = $value;
			}
		}
	}

	public function __destruct() {
//		global $logger;
//    	$logger->log("Destroying factuurregel " . $this->__toString() . "!\n",PEAR_LOG_INFO);
   	}
   	
   	public function __toString() {
        return $this->Id." (".$this->Bedrag." EUR)";
    }
}
?>